chore(migrations): remove nulls from root state#39471
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [1f3d4b2]
UI Startup Metrics (1330 ± 107 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
There was a problem hiding this comment.
Pull request overview
This PR introduces migration 190 to clean up null seedPhrase values from the MetaMask extension state. This addresses a state inconsistency issue where seedPhrase was being set to null instead of being properly removed.
Changes:
- Added migration 190 to delete seedPhrase property when its value is null
- Updated migration index to include the new migration
- Updated E2E test snapshot to reflect the new version number
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/scripts/migrations/190.ts | Implements migration logic to remove null seedPhrase from state and track the change |
| app/scripts/migrations/190.test.ts | Adds tests for null and non-null seedPhrase scenarios |
| app/scripts/migrations/index.js | Registers migration 190 in the migrations array |
| test/e2e/tests/metrics/state-snapshots/errors-before-init-opt-in-ui-state.json | Updates version metadata to 190 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Builds ready [b05d079]
UI Startup Metrics (1281 ± 108 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
seedWords from state
b05d079 to
4a48857
Compare
4a48857 to
e62504f
Compare
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/extension-platform (1 files, +2 -2)
🧪 @MetaMask/qa (1 files, +2 -2)
|
Builds ready [7571098]
UI Startup Metrics (1345 ± 112 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [7647c82]
UI Startup Metrics (1337 ± 77 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [913c96f]
UI Startup Metrics (1397 ± 102 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Description
Follow up to the workaround in 3345f3e
Changelog
CHANGELOG entry: null
Related issues
Related to: #39464
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Small, targeted state cleanup that only removes keys when explicitly set to
null; changes are covered by focused unit tests and fixture version bumps.Overview
Adds migration
194that cleans persisted root state by deletingseedWordsandforgottenPasswordonly when the keys exist and their values arenull, recording the deletions inchangedKeys.Registers the new migration in
migrations/index.js, adds unit tests covering null/non-null/missing-key cases, and updates e2e fixtures/state snapshots to expectversion/currentMigrationVersion194.Written by Cursor Bugbot for commit 913c96f. This will update automatically on new commits. Configure here.